projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0e0af1
)
macos: fix calculation of mouse position
author
Christian Hergert
<chergert@redhat.com>
Thu, 5 Nov 2020 02:02:04 +0000
(18:02 -0800)
committer
Christian Hergert
<chergert@redhat.com>
Thu, 5 Nov 2020 02:03:54 +0000
(18:03 -0800)
This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
gdk/macos/gdkmacossurface.c
patch
|
blob
|
history
diff --git
a/gdk/macos/gdkmacossurface.c
b/gdk/macos/gdkmacossurface.c
index 9925407d46d8469af723a5695f1298bdfe522f96..2360e1c476fd4a1ab6b19300b756c985aaeca19b 100644
(file)
--- a/
gdk/macos/gdkmacossurface.c
+++ b/
gdk/macos/gdkmacossurface.c
@@
-256,7
+256,7
@@
gdk_macos_surface_get_device_state (GdkSurface *surface,
| _gdk_macos_display_get_current_mouse_modifiers (GDK_MACOS_DISPLAY (display));
*x = point.x;
- *y =
point.y - surface->height
;
+ *y =
surface->height - point.y
;
return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
}